// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-6-24

#ifndef __JOYWNDCONTAINER_H_COMMON_UI__
#define __JOYWNDCONTAINER_H_COMMON_UI__

#pragma once
#include "wnd.h"

//##ModelId=44CF17B50234
class CJoyWndContainer :
    public CJoyWnd
{
	DECLARE_DYNAMIC(CJoyWndContainer)
protected:
	//##ModelId=44CF17B50236
    CRect   m_margin;
	//##ModelId=44CF17B50243
    CWnd*   m_pWnd;

	//##ModelId=44CF17B50247
    void ValidateArea(int cx, int cy);
	//##ModelId=44CF17B5024A
    virtual void DoAlignChilds(CRect& remain);

	//##ModelId=44CF17B50251
    virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
	//##ModelId=44CF17B50254
    virtual void CM_Draw(Graphics& graph);
public:
	//##ModelId=44CF17B50257
    CJoyWndContainer(void);
	//##ModelId=44CF17B50259
    virtual ~CJoyWndContainer(void);

	//##ModelId=44CF17B50261
    void SetMargin(const CRect& margin);
	//##ModelId=44CF17B50263
    void SetWnd(CWnd* pWnd);
	//##ModelId=44CF17B50265
    CWnd* GetWnd() const
    {
        return m_pWnd;
    }

public:
    DECLARE_MESSAGE_MAP()
	//##ModelId=44CF17B50267
    afx_msg void OnSize(UINT nType, int cx, int cy);
	//##ModelId=44CF17B50272
    afx_msg void OnDestroy();
};


#endif  // __JOYWNDCONTAINER_H_COMMON_UI__
